package com.club.football.dto;


import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

import static com.club.football.common.CommonConstants.NULL_MSG;

/**
 * 用户将数据保存dto
 *
 * @author 1
 * @date 2024/01/18
 */
@Data
public class UserSaveDto {

    private Long userId;
    /**
     * 账号
     */
    @NotBlank(message = NULL_MSG + "帐号")
    @Length(max = 32, min = 4, message = "帐号不能少于{min}或超过{max}个字符")
    private String acc;

    /**
     * 名字
     */
    @NotBlank(message = NULL_MSG + "姓名")
    @Length(max = 16, min = 1, message = "姓名不能少于{min}或超过{max}个字符")
    private String name;

    /**
     * 电话
     */
    @NotBlank(message = NULL_MSG + "手机号")
    @Length(max = 11, min = 11, message = "手机号不能少于{min}或超过{max}个字符")
    private String phone;
    /**
     * 编码
     */
    private String code;

}
